package com.forenow.demo.Bank;
import java.util.Scanner;
public class change {
    boolean flag = false;
    public static void xg(){
        String password="123";
        System.out.println("请输入旧密码");
        Scanner sc = new Scanner(System.in);
        String old_pwd = sc.next();
        if (old_pwd.equals(password)) {
            System.out.println("请输入新密码");
            String new_pwd = sc.next();
            System.out.println("请再次输入新密码");
            String new_pwd1 = sc.next();
            if (new_pwd.equals(new_pwd1)) {
                System.out.println("密码修改成功");
            } else {
                System.out.println("两次输入密码不一致，请重新输入");

            }

        } else {
            System.out.println("旧密码输入错误");
        }
    }
}
